package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.query.StatQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface StatFeign {

    @PostMapping("/stat/statYesterday")
    @ResponseBody
    MsgModel statYesterday();

    @PostMapping("/stat/getShopNewCustomerStat")
    @ResponseBody
    MsgModel getShopNewCustomerStat(@RequestBody StatQuery query);

    @PostMapping("/stat/getShopBuyStat")
    @ResponseBody
    MsgModel getShopBuyStat(@RequestBody StatQuery query);

    @PostMapping("/stat/merchantMonthStat")
    @ResponseBody
    MsgModel merchantMonthStat(@RequestBody StatQuery query);

    @GetMapping("/stat/dayReRun")
    String dayReRun();

    @GetMapping("/stat/monthReRun")
    String monthReRun();
}
